🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / map / src / commonMain / kotlin / org / meshtastic / feature / map / component / BasemapMenu.kt
Displaying Raw • Download
feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/BasemapMenu.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 3.38 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tf0883e@fileTb4b4b4:Te6edf3OptInTb4b4b4(Te6edf3ExperimentalMaterial3ExpressiveApiTff7b72::Te6edf3classTb4b4b4)
Tff7b72package T7ee787org.meshtastic.feature.map.component
Tff7b72import T7ee787androidx.compose.material3.DropdownMenu
Tff7b72import T7ee787androidx.compose.material3.DropdownMenuGroup
Tff7b72import T7ee787androidx.compose.material3.DropdownMenuItem
Tff7b72import T7ee787androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
Tff7b72import T7ee787androidx.compose.material3.Icon
Tff7b72import T7ee787androidx.compose.material3.MenuDefaults
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.selected_map_type
Tff7b72import T7ee787org.meshtastic.core.ui.icon.Check
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
T8b949e/**
* The menu that picks what the map draws underneath the mesh.
*
* Both maps show the same shape — the renderer's own styles, then the shared raster catalogue, then the user's custom
* sources, then whatever the host appends — and previously each flavour had its own copy of it. What differs is only
* the contents of [groups], which the caller assembles: the Google map opens with Google's four map types where the
* MapLibre map opens with its vector styles.
*
* Each list in [groups] renders as a visually separate block; empty ones are dropped so a user with no custom sources
* sees no empty divider.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffBasemapMenuTb4b4b4(
Te6edf3expandedTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3onDismissRequestTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3groupsTb4b4b4: Te6edf3ListTff7b72<Te6edf3ListTff7b72<Te6edf3BasemapChoiceTff7b72>Tff7b72>Tb4b4b4,
Te6edf3selectedIdTb4b4b4: Tffa657String?Tb4b4b4,
Te6edf3onSelectTb4b4b4: Tb4b4b4(Te6edf3BasemapChoiceTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4,
Te6edf3trailingContentTb4b4b4: Tf0883e@Composable Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657Unit Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3DropdownMenuTb4b4b4(Te6edf3expanded Tff7b72= Te6edf3expandedTb4b4b4, Te6edf3onDismissRequest Tff7b72= Te6edf3onDismissRequestTb4b4b4, Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4) Tb4b4b4{
Te6edf3groups
Tb4b4b4.Te6edf3filter Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3isNotEmptyTb4b4b4(Tb4b4b4) Tb4b4b4}
Tb4b4b4.Te6edf3forEach Tb4b4b4{ Te6edf3group Tff7b72-Tff7b72>
Te6edf3DropdownMenuGroupTb4b4b4(Te6edf3shapes Tff7b72= Te6edf3MenuDefaultsTb4b4b4.Te6edf3groupShapesTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4{
Te6edf3groupTb4b4b4.Te6edf3forEach Tb4b4b4{ Te6edf3choice Tff7b72-Tff7b72>
Te6edf3BasemapMenuItemTb4b4b4(Te6edf3choice Tff7b72= Te6edf3choiceTb4b4b4, Te6edf3selected Tff7b72= Te6edf3choiceTb4b4b4.Te6edf3id Tff7b72=Tff7b72= Te6edf3selectedIdTb4b4b4) Tb4b4b4{
Te6edf3onSelectTb4b4b4(Te6edf3choiceTb4b4b4)
Te6edf3onDismissRequestTb4b4b4(Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Te6edf3trailingContentTb4b4b4(Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tf0883e@Composable
Tff7b72private Tff7b72fun Td2a8ffBasemapMenuItemTb4b4b4(Te6edf3choiceTb4b4b4: Te6edf3BasemapChoiceTb4b4b4, Te6edf3selectedTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3onClickTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Te6edf3DropdownMenuItemTb4b4b4(
Te6edf3text Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3text Tff7b72= Te6edf3choiceTb4b4b4.Te6edf3labelTb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3onClick Tff7b72= Te6edf3onClickTb4b4b4,
Te6edf3trailingIcon Tff7b72=
Tff7b72if Tb4b4b4(Te6edf3selectedTb4b4b4) Tb4b4b4{
Tb4b4b4{ Te6edf3IconTb4b4b4(Te6edf3MeshtasticIconsTb4b4b4.Te6edf3CheckTb4b4b4, Te6edf3contentDescription Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3selected_map_typeTb4b4b4)Tb4b4b4) Tb4b4b4}
Tb4b4b4} Tff7b72else Tb4b4b4{
Tff7b72null
Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Served by rngit 1.5.2 - Generated in 0.03s